package cn.gok.yufa;

import java.io.UnsupportedEncodingException;

public class 变量和常量 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        //test();
        //test1();
        test4();
    }

    private static void test(){
        int i = Integer.MAX_VALUE;
        System.out.println(i);

        //long类型的后面加上L
        long i2 = 123214435345L;
    }
    private static void test1() throws UnsupportedEncodingException {
        //字节数
        System.out.println(new String("中").getBytes("utf-8").length);
    }

    private static void test2(){
        //拆装箱
        int i = 10;
        Integer i2 = i;//自动装箱
        Integer i3 = new Integer(i);
        Integer i4 = Integer.valueOf(i);
        //拆箱
        int i5 = i2.intValue();
    }
    private static void test3(){
        //字符转换
        int a = 123;
        String str = Integer.valueOf(a).toString();
        String str1 = a+"";
    }

    private static void test4(){
        //打印26个大小写字母
        int i = 'a';
        int j = 'A';
        for (int k = 0;k < 26;k++){
            System.out.println((char)(i+k)+"---"+(char)(j+k));
        }
    }

}
